package com.bestcem.xm.user.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Oa相关配置参数
 *
 * @author qiongyu.cui <qiongyu.cui@idiaoyan.com>
 * @date 2022/3/2 11:36
 */
@Component
@Data
@ConfigurationProperties(prefix = "app.user.oa")
public class OaProperties {

    /**
     * 接口地址
     */
    private String url;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码
     */
    private String password;

    /**
     * 获取baseUrl
     */
     public String getBaseUrl() {
        return url;
    }

    /**
     * 获取authUrl
     */
    public String getAuthUrl() {
        return url + "/token/";
    }

    /**
     * 获取checkUrl
     */
    public String getCheckUrl() {
        return url + "/api/check_mobile/";
    }

}
